﻿@using Abc.Core;
@using Abc.Core.Entities;
@using Abc.Application;
@model Abc.Application.DataDictionaryOut;
@{
    ViewData["Title"] = "数据配置";
}
<section class="panel panel-padding">
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">

        <form class="layui-form" action="">
            <input type="hidden" asp-for="Id" />
            <input type="hidden" asp-for="PKey" />
            @*<div class="layui-form-item">
                <label class="layui-form-label">唯一标识Key</label>
                <div class="layui-input-block">
                <input  asp-for="Key"  lay-verify="required|key" lay-reqText="唯一标识Key不能为空！" autocomplete="off" placeholder="请输入唯一标识Key" class="layui-input">
                </div>
                </div>
                <div class="layui-form-item">
                <label class="layui-form-label">PKey</label>
                <div class="layui-input-block">
                <input  asp-for="PKey"  lay-verify="required|pKey" lay-reqText="PKey不能为空！" autocomplete="off" placeholder="请输入PKey" class="layui-input">
                </div>
                </div>  *@
            <div class="layui-form-item">
                <label class="layui-form-label">名称</label>
                <div class="layui-input-block">
                    <input asp-for="Name" lay-verify="required|name" lay-reqText="名称不能为空！" autocomplete="off" placeholder="请输入名称" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-block">
                    <input asp-for="Sort" lay-verify="required|sort" lay-reqText="排序不能为空！" autocomplete="off" placeholder="请输入排序" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" asp-for="Remark" lay-verify="remark"></textarea>
                </div>
            </div>

            @*
                <textarea placeholder="请输入内容" class="layui-textarea"></textarea>
                <input type="radio" name="sex" value="男" title="男" checked="">
                <input type="radio" name="sex" value="女" title="女">
                <input type="radio" name="sex" value="禁" title="禁用" disabled="">
            *@
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-btn submitbtn" lay-submit lay-filter="submit">提交数据</div>
                    <div class="layui-btn layui-btn-danger closewindow">关闭窗口</div>
                </div>
            </div>
        </form>
    </div>
</section>

@section Scripts{
<script>
    layui.define(['element',  'jquery', 'form'], function () {
        let  $ = layui.jquery;
        let  form = layui.form;
        let  element = layui.element;

        abc.infoInit();
        //提交
        form.on('submit(submit)', function (obj) {
            //obj.field.IsEnable=$('#IsEnable').is(':checked');
            //obj.field.Remark = Remark.getContent();
            abc.post({ url: '@(Url.Action("Edit"))', data: obj.field});

            return false;
        });


    });
</script>
}
